<!DOCTYPE HTML>
<html>
<head>
<#include "WEB-INF/view/_frag/meta.ftl">
<#include "WEB-INF/view/_frag/jscss.ftl">
<link href="${basePath}/assets/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${basePath}/assets/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${basePath}/assets/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="${basePath}/assets/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<link href="${basePath}/assets/h-ui.admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />

<title>App新闻管理</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> App管理 <span class="c-gray en">&gt;</span> 新闻管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="page-container">
		<form action="${basePath}/appNews/list" method="post" class="form form-horizontal">
			<div class="row cl">
				&nbsp;&nbsp;&nbsp;&nbsp;标题：
				<input type="text" class="input-text radius size-S" style="width:120px" id="" name="appNews.title" value="${appNews.title}">
				<div class="formControls col-xs-3 col-sm-2">
					<input type="text" name="startDate" value="${startDate}" placeholder="开始日期" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate">
				</div>
				<div class="formControls col-xs-3 col-sm-2">
					<!-- <input type="text" name="endDate" value="${endDate}" placeholder="结束日期" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })" id="datemax" class="input-text Wdate"> -->
					<input type="text" name="endDate" value="${endDate}" placeholder="结束日期" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}'})" id="datemax" class="input-text Wdate">
				</div>
				&nbsp;&nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-success radius size-S" id="" name="" ><i class="Hui-iconfont">&#xe665;</i> 查询</button>
			</div>
		</form>
 	 	<#if opeList?seq_contains(perms.PERM_NEWS_ADD)>
  		<div class="cl pd-5 bg-1 bk-gray mt-20">
  			<span class="l"> <a href="${basePath}/appNews/toOper" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加App新闻</a></span>
  		</div>
   		</#if>	
		<div class="mt-20">
			<table id="data-list" class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">	
						<th>序号</th> 
						<th>标题</th>
						<th>类型</th>
						<!-- <th>图片地址</th> -->
						<th>录入时间</th>
						 
						
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<#list page.dataList as appNews>
					<tr class="text-c"> 
						<td>${appNews_index+1}</td>
						<td><a href="${appNews.url}"  target="_blank">${appNews.title}</a></td>
						<!--  <td><a href="${basePath}/${appNews.picture}">${appNews.picture}</a></td>
						<td><img src="${basePath}/${appNews.picture}" width="100px" height="75px"/></td> -->
						
						<td>
							<#list page.news_type as news_type>
							<#if appNews.news_type == news_type.c_key>
								 ${news_type.c_value} 
							</#if>
							</#list>

						</td>
						
						
						
						<td>${appNews.date}</td>

						<td class="td-manage">
						<#if opeList?seq_contains(perms.PERM_NEWS_UPDATE)> 
							<a title="编辑" href="${basePath}/appNews/toOper?appNews.id=${appNews.id}"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
						</#if>
					 
						<#if opeList?seq_contains(perms.PERM_NEWS_DEL)> 
							<a title="删除" href="javascript:;" onclick="del('${appNews.id}')" class="ml-5" style="text-decoration: none"><i class="Hui-iconfont">&#xe6e2;</i></a>
						</#if>
						
						 
						</td>
					</tr>
					</#list>
				</tbody>
			</table>
		</div>
		<div class="pd-5 mt-20" id="jsPage"></div>
	</div> 

<script type="text/javascript">
	${page.jsPage}

	function del(id) {
		layer.confirm('确定要删除吗？', {
				btn : [ '确定', '取消' ]
			}, function() {
				window.location.href = '${basePath}/appNews/delete?appNews.id=' + id;
			}, function() {
			});
	}
	
</script> 
</body>
</html>